<title><?= $this->email ?>'s Comments</title>
<h3><?= $this->email ?>'s Comments</h3>
<table class="table well">    
    <thead>
        <tr>
            <th>#</th>
            <th>Comment</th>
            <th>Date</th>
        </tr>
    </thead>
    <tbody>
        <?php
        $i = 1;
        $userDb = new Users_Model_Users();
        foreach ($this->users as $user) {
            $output = $userDb->getAllCommentsByUser($user['id']);
            for ($index = sizeof($output) - 1; $index >= 0; $index--) {
                $comment = $output[$index]['comment'];
                $date = $output[$index]['date'];
                ?>
                <tr>
                    <td class="span1"><?= $i; ?></td>
                    <td class="span12"><?= $comment ?></td>
                    <td class="span3"><?= $date ?></td>
                </tr>

                <?php
                $i++;
            }
        }
        ?>
    </tbody>
</table>

<a class="btn btn-info" href="<?= $this->url(array(), 'users-list'); ?>"><i class='icon-circle-arrow-left'></i> Back to users list</a>
<a class="btn btn-info" href="<?= $this->url(array('id' => $user['id']), 'user-public-profile'); ?>" ><i class='icon-circle-arrow-left'></i> Back to <?= $this->email ?>'s Profile</a>